<div class="spacing-bottom-sm row" page-header="Manage customers">
    <div class="col-sm-3">
        <input class="form-control" ng-model="filters.name" placeholder="Search customer name" ui-keypress="{13:'reSearch()'}" />
    </div>
    <div class="col-sm-3">
        <input class="form-control" ng-model="filters.city" placeholder="Search by City/Province" ui-keypress="{13:'reSearch()'}" />
    </div>
    <div class="col-sm-6">
        <a class="btn btn-info" ui-sref="customer-new" has-access="CustomerCreate">
            <b class="glyphicon glyphicon-plus"></b> New Customer
        </a>
    </div>
</div>

<table ng-table="tableParams" class="table table-hover table-bordered ng-table-resizable-columns" ng-visible="$data.length">
    <tr ng-repeat="item in $data">
        <td data-title="'#'" header-class="col-sm-1 width3"><span class="form-control-static">{{item.id}}</span></td>
        <td data-title="'Customer'" header-class="col-sm-4 width25"><span class="form-control-static">{{item.name}}</span></td>
        <td data-title="'Address'" header-class="col-sm-4 width25">
            <span class="form-control-static">
                {{item.address}}
                <span ng-if="item.city">, {{item.city}}</span>
                <span ng-if="item.state">, {{item.state}}</span>
                <span ng-if="item.country">, {{item.country}}</span>
            </span>
        </td>
        <td data-title="'Tel'" header-class="col-sm-1 width10"><span class="form-control-static">{{item.tel}}</span></td>
        <td data-title="'Note'" header-class="col-sm-2 width10"><span class="form-control-static">{{item.note}}</span></td>
        <td data-title="'Salesman'" header-class="col-sm-2 width10"><span class="form-control-static">{{item.salesmanName}}</span></td>
        <td class="text-center" header-class="col-sm-1 width5">
            <a ui-sref="customer-item({id: item.id})" class="btn btn-default">View</a>
        </td>
        <!--<td data-title="'Mobile'" header-class="col-sm-1"><span class="form-control-static">{{item.mobile}}</span></td>-->
        <!--<td data-title="'Contact person'"  header-class="col-sm-2"><span class="form-control-static">{{item.contactPersonName}}</span></td>-->
    </tr>
</table>
<div ng-show="!tableParams.settings().$loading && tableParams.data.length === 0" class="well text-center">No result</div>